package cn.edu.ecust.controller.achievement;

import cn.edu.ecust.common.util.Resp;
import cn.edu.ecust.service.achievement.AchievementProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/achievement")
@Api(value = "项目", tags = {"项目"})
public class AchievementProjectController {
    @Autowired
    private AchievementProjectService achievementProjectService;

    @GetMapping("/project")
    @ApiOperation(value = "项目")
    public Resp page(@Validated @RequestParam(defaultValue = "1") Integer page,
                     @Validated @RequestParam(defaultValue = "10") Integer pageSize ){
        return achievementProjectService.page(page,pageSize);
    }
}
